const { defineConfig } = require("@vue/cli-service");
const path = require("path");
module.exports = defineConfig({
  transpileDependencies: true,
  productionSourceMap: false,
  lintOnSave: false,
  devServer: {
    host: "127.0.0.1",
    port: "8081", //指定端口号
    open: true, //自动打开浏览器
    hot: true, //热更新
    //proxy: 'http://item.mhdigitaling.com/index.php/Shell2022/Index',//代理请求数据地址  开发阶段处理跨域问题
  },
  publicPath: "./", //打包后文件的相对路径
  pwa: {
    iconPaths: {
      favicon32: "",
      favicon16: "",
      appleTouchIcon: "",
      maskIcon: "",
      msTileImage: "",
    },
  },
  pluginOptions: {
    "style-resources-loader": {
      preProcessor: "less",
      patterns: [path.resolve(__dirname, "./src/styles/color.less")],
    },
  },
  configureWebpack: {
    resolve: {
      fallback: {
        https: false,
        http: false,
        url: false,
        fs: false,
        canvas: false,
      },
    },
  },
});
